>80分★★★急急急!!!C++语言问题,高手进!!!
来源:百度知道 编辑:UC知道 时间:2024/09/21 03:17:38
感谢语或评论:
哈哈,我开多一个问题是因为你写的太难了有一点不明白,怎知还是同一班人啊?
给你加了一点分了,再一次谢谢。。。。。。
=========
jaycnvip 也感谢你的帮助在另一处给了你分
#include<iostream>
#include<conio.h>
#include<fstream>
#include<windows.h>
#include<io.h>
#include<iomanip>
#define OK 1
#define ERROR 0
using namespace std;
typedef int Status; /*返回值的类型*/
static int STU_COUNT=0;
typedef struct student
{
char num[20];
char name[20];
char sex[4];
char speciality[20];
student *next;
}node;
typedef struct LIST
{
node *head,*tail;
}link;
Status AvgScore(link *s); /*声明一下求平均值的函数*/
node *MakeNode(char num[],char name[],char sex[],char speciality[]) /*生成存放学生信息的节点*/
{
node *p=(node *)malloc(sizeof(node));
strcpy(p->num,num); /*存放学号*/
strcpy(p->name,name);
strcpy(p->sex,sex);
strcpy(p->speciality,speciality);
p->next=NULL; /*刚生成的节点下一个为空*/